<template>
        <el-menu 
            :style="{width:!isCollapse?'230px':'64px'}"
            active-text-color="#ffd04b" 
            background-color="#545c64" 
            class="el-menu-vertical-demo" 
            :default-active="active"
            text-color="#fff" 
            @open="handleOpen"
            @close="handleClose"
            :collapse="isCollapse"             >
            <p class="logo-lg">{{ isCollapse?'DIDI':'DIDI陪诊' }}</p>
            <TreeMenu :menuData="menuData" />
        </el-menu>
</template>

<script setup>
import TreeMenu from './treeMenu.vue';
import { useRouter } from 'vue-router';
import { reactive,computed,onMounted } from 'vue';
import { useStore } from 'vuex'
const store = useStore()
const isCollapse =  computed(()=> store.state.menu.isCollapse)
const router = useRouter()
const menuData = computed(()=>store.state.menu.routerList)
const active = computed(()=> store.state.menu.menuActive)
const add =()=>{
    console.log(active)
}
const handleOpen = () => {
    
}
const handleClose = () => {

}
</script>

<style lang="less" scoped>
.el-menu {
    background-color: #545c63;

    .logo-lg {
        font-size: 20px;
        text-align: center;
        height: 50px;
        line-height: 50px;
        color: #fff;


    }
}
</style>